package com.gancp.service.impl;

import com.gancp.dao.IBaseMapper;
import com.gancp.dao.commonservice.MyBlogMapper;
import com.gancp.domain.MyBlog;
import com.gancp.service.MyBlogBiz;
import com.gancp.service.base.BaseBizImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * @Author gancp
 * @Date 时间被黑洞吸走了
 * @Descripition 我的博客业务实现类
 **/
@Service("MyBlogBiz")
@Transactional
public class MyBlogBizImpl extends BaseBizImpl<MyBlog, Long> implements MyBlogBiz {
    private Logger log = LoggerFactory.getLogger( MyBlogBizImpl.class );

    @Autowired
    private MyBlogMapper myBlogMapper;

    @Override
    protected IBaseMapper getIBaseMapper() {
        return myBlogMapper;
    }

    @Override
    public Long insertAndGetId(MyBlog myBlog) {
        return myBlogMapper.insertAndGetId( myBlog );
    }

    @Override
    public List<Map<String, Object>> queryBlogPageByParam(MyBlog myBlog) {
        return myBlogMapper.queryBlogPageByParam( myBlog );
    }
}
